// commonJS 引入模块
// const cal = require('./cal.js')
// es6 的模块引入
import cal from './cal'

document.getElementById('btn').onclick = function () {
    var n1 = document.getElementById('n1').value - 0;
    var n2 = document.getElementById('n2').value - 0;
    var result = cal.add(n1, n2);
    document.getElementById('result').value = result
}